﻿@page "/api/{component}"
@using MudBlazor.Docs.Extensions


@if (ComponentType == null)
{
    <MudProgressCircular Indeterminate="true"></MudProgressCircular>
}
else
{
    <DocsApi Type="@ComponentType"></DocsApi>
}


@code {
    [Parameter] public string component { get; set; }

    public Type ComponentType { get; set; }

    protected override void OnParametersSet()
    {
        ComponentType = ApiLink.GetTypeFromComponentLink(component);
        StateHasChanged();
    }
}